package com.culturalCenter.dataCenter.mapper.training;

import com.culturalCenter.dataCenter.entity.training.TrainingTodayCount;
import com.culturalCenter.dataCenter.mapper.base.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 培训状态统计表(TrainingTodayCount)表数据库访问层
 *
 * @author makejava
 * @since 2020-09-25 10:33:54
 */
@Mapper
public interface TrainingTodayCountMapper extends BaseMapper<TrainingTodayCount> {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     *
     * @return 实例对象
     */
    TrainingTodayCount queryById(@Param("id") String id);

    /**
     * 查询指定行数据
     *
     * @param offset 查询起始位置
     * @param limit  查询条数
     *
     * @return 对象列表
     */
    List<TrainingTodayCount> queryAllByLimit(@Param("offset") int offset, @Param("limit") int limit);

    /**
     * 分页查询所有数据
     *
     * @return 对象列表
     */
    List<TrainingTodayCount> findPageAll();

    /**
     * 通过实体作为筛选条件查询
     *
     * @param trainingTodayCount 实例对象
     *
     * @return 对象列表
     */
    List<TrainingTodayCount> queryAll(TrainingTodayCount trainingTodayCount);

    /**
     * 新增数据
     *
     * @param trainingTodayCount 实例对象
     *
     * @return 影响行数
     */
    int insert(TrainingTodayCount trainingTodayCount);

    /**
     * 选择列增加
     *
     * @param trainingTodayCount 实例对象
     *
     * @return 影响行数
     */
    int insertSelective(TrainingTodayCount trainingTodayCount);

    /**
     * 修改数据
     *
     * @param trainingTodayCount 实例对象
     *
     * @return 影响行数
     */
    int update(TrainingTodayCount trainingTodayCount);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     *
     * @return 影响行数
     */
    int deleteById(@Param("id") String id);

    /**
     * 查询培训列表的培训数
     *
     * @return
     */
    List<TrainingTodayCount> findTrainingList(@Param("branchId") String branchId);

}
